<include file="/public/header" />
<style>
    .layui-table-cell {
        overflow: visible;
        text-overflow: inherit;
        white-space: normal;
        height: auto;
        /*在这里设置行高没用*/
    }
</style>
<div class="layui-fluid">
    <div class="layui-card">
        <!-- // 默认操作按钮 -->
        <!-- <div class="layui-card-header layadmin-card-header-auto ">
            <div class="layui-form">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <div class="layui-input-inline ">
                            <input type="text" name="title" class="layui-input" placeholder="材料名称">
                        </div>
                    </div>

                    <div class="layui-inline">
                        <button class="layui-btn icon-btn" lay-filter="formSearch" lay-submit><i
                                class="layui-icon layui-icon-search"></i>{:__('搜索')}</button>
                        <div class="layui-divider layui-divider-vertical"></div>
                    </div>
                </div>
            </div>
        </div> -->

        <!-- // 创建数据实例 -->
        <table id="lay-tableList" lay-filter="lay-tableList"></table>
    </div>
</div>
<include file="/public/footer" />
<script>
    layui.use(['admin', 'layedit', 'table', 'form', 'content'], function () {
        var admin = layui.admin;
        var table = layui.table;
        var form = layui.form;
        /*
         * 初始化表格
        */
        var isTable = table.render({
            elem: "#lay-tableList"
            , url: "{:url('/system/product/log')}"
            ,where:{
                goodsid:"{:input('id')}"
            }
            , page: true
            , limit: 18
            , cols: [[
                // { type: 'checkbox', width: 50 },
                { field: 'id', align: 'center', sort: true, width: 80, title: 'ID' },
                { field: 'goodstext', align: 'center',   title: '产品名称' },
                { field: 'type_text', align: 'center',  title: '操作类型' },
                { field: 'befores', align: 'center', sort: true, title: '操作前库存' },
                { field: 'money', align: 'center', sort: true, title: '变更库存' },
                { field: 'afters', align: 'center', sort: true, title: '操作后库存' },
                { field: 'info', align: 'center',  title: '说明' },
                { field: 'create_time', align: 'center',title: '操作时间' },
            ]],
            done: function () {
                //当数据渲染完后，执行的回调
            }
        })
    })
</script>